package BanyuanClub.Study.Day0223.Object;

/**
 * clone是一种浅复制
 */
public class TextClone {
    public static void main(String[] args) throws CloneNotSupportedException {
        B b = new B(100);
        A a = new A("aaa",20,b);
        A obj = (A)a.clone();
        B b1 = obj.getB();
        System.out.println(obj);
        System.out.println(b == b1);
    }
}
